
package com.hospital.register.dto.order;

import com.hospital.register.dto.base.ApiBaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.TreeMap;

/**
 * 向医院提交的订单信息
 * 继承自ApiBaseDto，包含API基础信息
 */
@Data
@ApiModel(description = "向医院提交的订单信息")
public class OrderRetransmissionDto extends ApiBaseDto {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "医院编码")
    private String hoscode;

    @ApiModelProperty(value = "科室编码")
    private String depcode;

    @ApiModelProperty(value = "医院排班ID，医院自己的排班主见")
    private String hosScheduleId;

    @ApiModelProperty(value = "预约日期")
    private String reserveDate;

    @ApiModelProperty(value = "预约时间")
    private Integer reserveTime;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "患者姓名")
    private String name;

    @ApiModelProperty(value = "证件类型")
    private String certificatesType;

    @ApiModelProperty(value = "证件号码")
    private String certificatesNo;

    @ApiModelProperty(value = "性别")
    private Byte sex;

    @ApiModelProperty(value = "出生日期")
    private Date birthdate;

    @ApiModelProperty(value = "手机号码")
    private String phone;

    @ApiModelProperty(value = "婚姻状况")
    private Byte isMarry;

    @ApiModelProperty(value = "省份编码")
    private String provinceCode;

    @ApiModelProperty(value = "城市编码")
    private String cityCode;

    @ApiModelProperty(value = "地区编码")
    private String districtCode;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "紧急联系人姓名")
    private String contactsName;

    @ApiModelProperty(value = "紧急联系人证件类型")
    private String contactsCertificatesType;

    @ApiModelProperty(value = "紧急联系人证件号码")
    private String contactsCertificatesNo;

    @ApiModelProperty(value = "紧急联系人手机号码")
    private String contactsPhone;

    /**
     * 将自身转换为 TreeMap
     *
     * @return map
     */
    @Deprecated
    public TreeMap<String, Object> toMap() {
        TreeMap<String, Object> paramMap = new TreeMap<>();
        paramMap.put("hoscode", this.hoscode);
        paramMap.put("depcode", this.depcode);
        paramMap.put("hosScheduleId", this.hosScheduleId);
        paramMap.put("reserveDate", this.reserveDate);
        paramMap.put("reserveTime", this.reserveTime);
        paramMap.put("amount", this.amount);
        paramMap.put("name", this.name);
        paramMap.put("certificatesType", this.certificatesType);
        paramMap.put("certificatesNo", this.certificatesNo);
        paramMap.put("sex", this.sex);
        paramMap.put("birthdate", this.birthdate);
        paramMap.put("phone", this.phone);
        paramMap.put("isMarry", this.isMarry);
        paramMap.put("provinceCode", this.provinceCode);
        paramMap.put("cityCode", this.cityCode);
        paramMap.put("districtCode", this.districtCode);
        paramMap.put("address", this.address);
        paramMap.put("contactsName", this.contactsName);
        paramMap.put("contactsCertificatesType", this.contactsCertificatesType);
        paramMap.put("contactsCertificatesNo", this.contactsCertificatesNo);
        paramMap.put("contactsPhone", this.contactsPhone);
        paramMap.put("timestamp", this.getTimestamp());
        paramMap.put("sign", this.getSign());

        return paramMap;
    }

}